Optimal. Leaf size=54 \[ \frac {\cosh \left ((a+b x)^2\right )}{2 b^2}+\frac {a \sqrt {\pi } \text {Erf}(a+b x)}{4 b^2}-\frac {a \sqrt {\pi } \text {Erfi}(a+b x)}{4 b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.700, Rules used = {5472, 6874,
5406, 2235, 2236, 5428, 2718} \begin {gather*} \frac {\sqrt {\pi } a \text {Erf}(a+b x)}{4 b^2}-\frac {\sqrt {\pi } a \text {Erfi}(a+b x)}{4 b^2}+\frac {\cosh \left ((a+b x)^2\right )}{2 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2235
Rule 2236
Rule 2718
Rule 5406
Rule 5428
Rule 5472
Rule 6874
Rubi steps
\begin {align*} \int x \sinh \left ((a+b x)^2\right ) \, dx &=\frac {\text {Subst}\left (\int (-a+x) \sinh \left (x^2\right ) \, dx,x,a+b x\right )}{b^2}\\ &=\frac {\text {Subst}\left (\int \left (-a \sinh \left (x^2\right )+x \sinh \left (x^2\right )\right ) \, dx,x,a+b x\right )}{b^2}\\ &=\frac {\text {Subst}\left (\int x \sinh \left (x^2\right ) \, dx,x,a+b x\right )}{b^2}-\frac {a \text {Subst}\left (\int \sinh \left (x^2\right ) \, dx,x,a+b x\right )}{b^2}\\ &=\frac {\text {Subst}\left (\int \sinh (x) \, dx,x,(a+b x)^2\right )}{2 b^2}+\frac {a \text {Subst}\left (\int e^{-x^2} \, dx,x,a+b x\right )}{2 b^2}-\frac {a \text {Subst}\left (\int e^{x^2} \, dx,x,a+b x\right )}{2 b^2}\\ &=\frac {\cosh \left ((a+b x)^2\right )}{2 b^2}+\frac {a \sqrt {\pi } \text {erf}(a+b x)}{4 b^2}-\frac {a \sqrt {\pi } \text {erfi}(a+b x)}{4 b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 44, normalized size = 0.81 \begin {gather*} \frac {\cosh \left ((a+b x)^2\right )}{2 b^2}-\frac {a \sqrt {\pi } (-\text {Erf}(a+b x)+\text {Erfi}(a+b x))}{4 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.25, size = 66, normalized size = 1.22
method | result | size |
risch | \(\frac {{\mathrm e}^{-\left (b x +a \right )^{2}}}{4 b^{2}}+\frac {a \erf \left (b x +a \right ) \sqrt {\pi }}{4 b^{2}}+\frac {{\mathrm e}^{\left (b x +a \right )^{2}}}{4 b^{2}}+\frac {i a \sqrt {\pi }\, \erf \left (i b x +i a \right )}{4 b^{2}}\) | \(66\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 649 vs.
\(2 (44) = 88\).
time = 0.46, size = 649, normalized size = 12.02 \begin {gather*} \frac {1}{2} \, x^{2} \sinh \left ({\left (b x + a\right )}^{2}\right ) + \frac {1}{4} \, {\left (\frac {{\left (\frac {\sqrt {\pi } {\left (b^{2} x + a b\right )} a^{2} b^{3} {\left (\operatorname {erf}\left (\frac {\sqrt {{\left (b^{2} x + a b\right )}^{2}}}{b}\right ) - 1\right )}}{\sqrt {{\left (b^{2} x + a b\right )}^{2}} \left (-b^{2}\right )^{\frac {5}{2}}} - \frac {{\left (b^{2} x + a b\right )}^{3} b^{3} \Gamma \left (\frac {3}{2}, \frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{{\left ({\left (b^{2} x + a b\right )}^{2}\right )}^{\frac {3}{2}} \left (-b^{2}\right )^{\frac {5}{2}}} + \frac {2 \, a b^{3} e^{\left (-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}}{\left (-b^{2}\right )^{\frac {5}{2}}}\right )} a}{\sqrt {-b^{2}}} + \frac {{\left (\frac {\sqrt {\pi } {\left (b^{2} x + a b\right )} a^{3} b^{4} {\left (\operatorname {erf}\left (\frac {\sqrt {{\left (b^{2} x + a b\right )}^{2}}}{b}\right ) - 1\right )}}{\sqrt {{\left (b^{2} x + a b\right )}^{2}} \left (-b^{2}\right )^{\frac {7}{2}}} - \frac {3 \, {\left (b^{2} x + a b\right )}^{3} a b^{4} \Gamma \left (\frac {3}{2}, \frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{{\left ({\left (b^{2} x + a b\right )}^{2}\right )}^{\frac {3}{2}} \left (-b^{2}\right )^{\frac {7}{2}}} + \frac {3 \, a^{2} b^{4} e^{\left (-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}}{\left (-b^{2}\right )^{\frac {7}{2}}} + \frac {b^{4} \Gamma \left (2, \frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{\left (-b^{2}\right )^{\frac {7}{2}}}\right )} b}{\sqrt {-b^{2}}} - \frac {a {\left (\frac {\sqrt {\pi } {\left (b^{2} x + a b\right )} a^{2} {\left (\operatorname {erf}\left (\sqrt {-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}}\right ) - 1\right )}}{b^{3} \sqrt {-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}}} - \frac {2 \, a e^{\left (\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}}{b^{2}} - \frac {{\left (b^{2} x + a b\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{b^{5} \left (-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )^{\frac {3}{2}}}\right )}}{b} + \frac {\sqrt {\pi } {\left (b^{2} x + a b\right )} a^{3} {\left (\operatorname {erf}\left (\sqrt {-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}}\right ) - 1\right )}}{b^{4} \sqrt {-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}}} - \frac {3 \, a^{2} e^{\left (\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}}{b^{3}} + \frac {\Gamma \left (2, -\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{b^{3}} - \frac {3 \, {\left (b^{2} x + a b\right )}^{3} a \Gamma \left (\frac {3}{2}, -\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{b^{6} \left (-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )^{\frac {3}{2}}}\right )} b \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 134 vs.
\(2 (44) = 88\).
time = 0.37, size = 134, normalized size = 2.48 \begin {gather*} \frac {{\left (\sqrt {\pi } a \sqrt {b^{2}} \operatorname {erf}\left (\frac {\sqrt {b^{2}} {\left (b x + a\right )}}{b}\right ) e^{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )} - \sqrt {\pi } a \sqrt {b^{2}} \operatorname {erfi}\left (\frac {\sqrt {b^{2}} {\left (b x + a\right )}}{b}\right ) e^{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )} + b e^{\left (2 \, b^{2} x^{2} + 4 \, a b x + 2 \, a^{2}\right )} + b\right )} e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )}}{4 \, b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x \sinh {\left (a^{2} + 2 a b x + b^{2} x^{2} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains complex when optimal does not.
time = 0.42, size = 99, normalized size = 1.83 \begin {gather*} -\frac {-\frac {i \, \sqrt {\pi } a \operatorname {erf}\left (i \, b {\left (x + \frac {a}{b}\right )}\right )}{b} - \frac {e^{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}}{b}}{4 \, b} - \frac {\frac {\sqrt {\pi } a \operatorname {erf}\left (-b {\left (x + \frac {a}{b}\right )}\right )}{b} - \frac {e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )}}{b}}{4 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int x\,\mathrm {sinh}\left ({\left (a+b\,x\right )}^2\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________